<template>
        <Upload @uploadEvt="getAvatar" propsSize="100px" />
</template>

<script setup>
import { ref, watch } from 'vue'

const getAvatar = (avatar) => {
    photo.value = avatar
}
const photo = ref('')
const emit = defineEmits(['photosEvt'])
watch(()=>photo.value, () => {
    if (photo.value) {
        emit('photosEvt', photo.value)
    }
})

</script>

<style lang="scss" scoped>
</style>